#define# __MENU__  <#include file="{#LAM.DATA#}/menu.json" /> #end#
<div class="list-group" id="menu">
    <template v-for="menu in list">
        <a href="javascript:void(0);" class="list-group-item">{{menu.title}}<span class="caret ML5"></span></a>
        <div class="none submenu">
            <a v-for="submenu in menu.submenu" :href="submenu.url" class="list-group-item">{{submenu.title}}</a>
        </div>
    </template>
</div>

<script type="text/javascript">
    LAM.run(function(){
        'use strict';
        var System=this;
        System.setMenuSelectedStatus=function(href){
            $('.list-group .submenu a[href*="'+href+'"]')
                .addClass('active').closest('.submenu').show().prev('.list-group-item').addClass('p-active');
        };



        $(function () {

            new Vue({
                el:'#menu',
                data: {
                    list: __MENU__
                },
                created: function () {
                    /*
                    System.each(this.list,function(){
                        System.each(this.submenu,function(){
                            this.url = System.template(this.url,['{{','}}']);

                        });
                    });
                    */
                }
            });

            System.setMenuSelectedStatus(System.defaultRoute);
        });




    });
</script>